//
//  YSLCustomButton.h
//  YSLFramework
//
//  Created by beyond on 2017/12/28.
//  Copyright © 2017年 beyond. All rights reserved.
//

#import <UIKit/UIKit.h>

/*使用方法
 
 YSLCustomButton * top = [YSLCustomButton buttonWithType:UIButtonTypeCustom];
 top.backgroundColor = [UIColor greenColor];
 top.ysl_buttonType = YSLCustomButtonImageTop;
 top.ysl_spacing = 20;
 [top setImage:[UIImage imageNamed:@"icon"] forState:UIControlStateNormal];
 [top setTitle:@"图片在上" forState:UIControlStateNormal];
 [self.view addSubview:top];
 top.frame = CGRectMake(50, 100, 100, 100);
 
*/

/**
 *  图文样式
 */
typedef NS_ENUM(NSInteger, YSLCustomButtonType) {
    /**图片在上边*/
    YSLCustomButtonImageTop    = 0 ,
    /**图片在左边*/
    YSLCustomButtonImageLeft   = 1 ,
    /**图片在下边*/
    YSLCustomButtonImageBottom = 2 ,
    /**图片在右边*/
    YSLCustomButtonImageRight  = 3
};

@interface YSLCustomButton : UIButton

/** 图片和文字间距 默认10px*/
@property (nonatomic , assign) CGFloat ysl_spacing;

/** 按钮类型 默认YSLCustomButtonImageTop 图片在上边*/
@property (nonatomic , assign) YSLCustomButtonType ysl_buttonType;

@end
